
/*! 
	\file		vld.h
*	\brief		Visual Leak Detector main head file
*/
#pragma once

#if defined _DEBUG || defined VLD_FORCE_ENABLE

#include <windows.h>
#include "vldapi.h"

#pragma comment(lib, "vld.lib")

// Force a symbolic reference to the global VisualLeakDetector class object from
// the DLL. This ensures that the DLL is loaded and linked with the program,
// even if no code otherwise imports any of the DLL's exports.
#pragma comment(linker, "/include:__imp_?g_vld@@3VVisualLeakDetector@@A")

#else // !_debug

#define VLDenable()
#define VLDdisable()
#define VLDrestore()
#define VLDGlobalDisable()
#define VLDGlobalEnable()
#define VLDreportleaks() 0
#define VLDgetleakscount() 0
#define VLDmarkallleaksasreported()
#define VLDrefreshmodules()
#define VLDenablemodule(a)
#define VLDdisablemodule(b)
#define VLDgetoptions() 0
#define VLDgetreportfilename(a)
#define VLDsetoptions(a, b, c)
#define VLDsetreporthook(a, b)
#define VLDsetmoduleslist(a)
#define VLDgetmoduleslist(a, b) false
#define VLDsetreportoptions(a, b)
#define VLDResolveCallstacks()

#endif // _debug
